As per java language specification, there can be only one public class in a file (.java) and file name should be same as public class name. If you want another class accessible in other places, you may create a separate java file.
Liked By
Write Answer
Is it possible to have multiple public classes in Java ?
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
14-Jul-2015